﻿using System.ComponentModel.DataAnnotations;
using bpms.Enums;

namespace bpms.Models
{
    /// <summary>
    /// 登录视图模型
    /// </summary>
    public class LoginViewModel
    {
        [Required(ErrorMessage = "用户类型必选")]
        [Display(Name = "用户类型")]
        public UserType UserType { get; set; } = UserType.Admin;

        [Required(ErrorMessage = "登录名必填")]
        [Display(Name = "登录名")]
        public string LoginName { get; set; }

        [Required(ErrorMessage = "密码必填")]
        [DataType(DataType.Password)]
        [Display(Name = "密码")]
        public string Password { get; set; }
    }
}
